<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------

namespace Home\Widget;
use Think\Controller;

/**
 * bannerwidget
 * 用于动态调用分类信息
 */

class BannerWidget extends Controller{
	
	/* banner图 */
	public function lists($cate_id){
		$document=D("Document");
		$banner_list=$document->lists($cate_id);
		$article_banner=M("document_banner");
		foreach($banner_list as $key=>$val){
			$banner_list[$key]['links']=$article_banner->where("`id`=".$val['id'])->getField("links");
		}
		$this->assign("banner_list",$banner_list);
		$this->display('Banner/lists');
	}

}
